﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>送件列表</title>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/ydui.css?v=1.1.4" rel="stylesheet" />
    <script src="../js/ydui.flexible.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/all.css?v=20180302" />

</head>
<body ms-controller="indexview" class="ms-controller">
    <section class="g-flexview">
        <header class="m-navbar">
            <a onclick="history.go(-1)" class="navbar-item"><i class="back-ico"></i></a>
            <div class="navbar-center">
                <span class="navbar-title">送件列表</span>
            </div>
        </header>
        <section class="g-scrollview">

            <div class="m-cell">
                <div class="cell-item">

                    <div class="cell-left"><input type="text" class="cell-input" placeholder="收件人" autocomplete="off" style="width:40%;" ms-duplex="@ModelData.FOrgName" /></div>
                    <div class="cell-left"><input type="text" class="cell-input" placeholder="单号" autocomplete="off" style="width:40%;" ms-duplex="@ModelData.FItemName" /></div>

                </div>
                <div class="cell-item">

                    <div class="cell-left"><input type="date" class="cell-input" placeholder="请输入起始日期" autocomplete="off" style="width:40%;" ms-duplex="@ModelData.BFOperDate" /></div>
                    <div class="cell-left"><input type="date" class="cell-input" placeholder="请输入结束日期" autocomplete="off" style="width:40%;" ms-duplex="@ModelData.EFOperDate" /></div>

                </div>
                <button type="submit" class="btn-block btn-warning" style="margin-top:5px; height:50px;" ms-on-tap="@GetListData()">查询</button>

            </div>

            <div class="m-grids-3">
                <a href="#" class="grids-item">
                    <div class="grids-txt"><span>收件人</span></div>
                </a>
                <a href="#" class="grids-item">
                    <div class="grids-txt"><span>单号</span></div>
                </a>
                <a href="#" class="grids-item">
                    <div class="grids-txt"><span>状态</span></div>
                </a>

            </div>
            <div ms-for="el in @ListData1 ">
                <div class="m-grids-3">
                    <a href="#" class="grids-item">
                        <div class="grids-txt"><span>{{el.FCustName}}</span></div>
                    </a>
                    <a href="#" class="grids-item">
                        <div class="grids-txt"><span>{{el.FItemNO}}</span></div>
                    </a>
                    <a href="#" class="grids-item">
                        <div class="grids-txt"><span>{{el.FQty}}</span></div>
                    </a>

                </div>
            </div>

        </section>

        <footer class="m-tabbar">
            <a href="index.html" class="tabbar-item">
                <span class="tabbar-icon">
                    <i class="iconfont icon-home_light"></i>
                </span>
                <span class="tabbar-txt">首页</span>
            </a>

            <a href="orderlist.html" class="tabbar-item   tabbar-active">
                <span class="tabbar-icon">
                    <i class="iconfont icon-dingdan1"></i>
                </span>
                <span class="tabbar-txt">送件查询</span>
            </a>
            <a href="driveinfo.html" class="tabbar-item">
                <span class="tabbar-icon">
                    <i class="iconfont icon-fenlei1"></i>
                </span>
                <span class="tabbar-txt">我的资料</span>
            </a>
        </footer>
    </section>
    <script src="https://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
    <script src="../js/ydui.js"></script>
    <script src="../js/avalon.mobile.min.js"></script>
    <script src="../js/ComFunJS.js?v=201803071"></script>
    <script>

        $('[data-jui-slider]').slider({ lazyLoad: true });

        //$('.m-list').find('img').lazyLoad({ binder: '.g-scrollview' });

        var model = avalon.define({
            $id: "indexview",
            ModelData: { "FOrgName": "", "BFOperDate": "", "EFOperDate": "", "FItemName": "" },
            ListData1: [],

            GetListData: function () {
                var username = ComFunJS.getToken();
                $.getJSON("/api/user/stockop/11", { FOrgName: model.ModelData.FOrgName, BFOperDate: model.ModelData.BFOperDate, EFOperDate: model.ModelData.EFOperDate, FItemName: model.ModelData.FItemName  }, function (r) {
                    if (r.error == "") {
                        model.ListData1 = r.result;
                    }
                })

            }

        });
        avalon.ready(function () {
            model.ModelData.BFOperDate = getNowFormatDate();
            model.ModelData.EFOperDate = getNowFormatDate();

          //  model.GetListData();
        })

        function getNowFormatDate() {
            var date = new Date();
            var seperator1 = "-";
            var year = date.getFullYear();
            var month = date.getMonth() + 1;
            var strDate = date.getDate();
            if (month >= 1 && month <= 9) {
                month = "0" + month;
            }
            if (strDate >= 0 && strDate <= 9) {
                strDate = "0" + strDate;
            }
            var currentdate = year + seperator1 + month + seperator1 + strDate;
            return currentdate;
        }

    </script>
</body>
</html>
